﻿using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Json;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;

namespace ZFY.UMC.BlazorWebAssembly.HttpClients
{
    public class IdentityApiHttpClient
    {
        

        public readonly HttpClient _httpClient;



        public IdentityApiHttpClient(IHttpClientFactory httpClientFactory)
        {
            _httpClient = httpClientFactory.CreateClient("IdentityApi");
        }
    }

    public class IdentityApiUserHttpClient : IdentityApiHttpClient
    {


        public IdentityApiUserHttpClient(IHttpClientFactory httpClientFactory) : base(httpClientFactory)
        {

        }

        public async Task GetApi()
        {
            Console.WriteLine(_httpClient.BaseAddress);
            var res = await _httpClient.GetAsync("WeatherForecast");
        }
    }
}
